<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016-04-25
 * Time: 9:25
 */

class A
{
    const NAME = 'A';
    public static function test() {
        $args = func_get_args();
        echo static::NAME, " ".join(',', $args)." \n";
    }
}

class B extends A
{
    const NAME = 'B';

    public static function test() {
        echo self::NAME, "\n";
        forward_static_call_array(array('A', 'test'), array('more', 'args'));
        forward_static_call_array( 'test', array('other', 'args'));
    }
}

B::test('foo');

function test() {
    $args = func_get_args();
    echo "C ".join(',', $args)." \n";
}

?>